package online.longzipeng.back;

/**
 * @Author: lzp
 * @description: 评论
 * @Date: 2022/7/6
 */
public class Main {
    public static void main(String[] args) {
        System.out.println(singleNumber(new int[]{1, 1, 2, 2, 3, 4, 3}));
    }

    public static int singleNumber(int[] nums) {
        int a = nums[0];
        for (int i = 1; i < nums.length; i++) {
            a ^= nums[i];
        }
        return a;
    }

}
